3月 2 2015 Online Judge►UVa [UVa] 10165 - Stone Game 拈遊戲,此題可利用XOR運算。 123456789101112131415161718#include <iostream>using namespace std;int main(){ for ( int n ; cin >> n && n != 0 ; ) { int sum = 0 ; for ( int n2 = 0 , input ; n2 < n && cin >> input ; n2 ++ ) sum ^= input ; if ( sum != 0 ) cout << "Yes" << endl ; else cout << "No" << endl ; } return 0;} Newer [UVa] 100 - The 3n + 1 problem Older [UVa] 10887 - Concatenation of Languages